import { App } from 'src/app.entity'
import { ChangeSalary } from 'src/modules/change-salary/entities/change-salary.entity'
import { Staff } from 'src/modules/staff/entities/staff.entity'
import { Transfer } from 'src/modules/transfer/entities/transfer.entity'
import { Column, Entity, JoinColumn, ManyToOne } from 'typeorm'

@Entity()
export class Contract extends App {
  @ManyToOne(() => Staff)
  @JoinColumn({ name: 'staff_id' })
  staff: Staff
  @Column({ type: 'varchar', length: 200, name: 'job_description' })
  jobDescription: string
  @Column({ type: 'boolean', default: false })
  agreed: boolean
  @Column({ type: 'timestamp', name: 'effective_date' })
  effectiveDate: Date
  @Column({ type: 'varchar', length: 50, nullable: true })
  sign?: string
}
